package com.pan.structual.bridge.graphics.impl;

import com.pan.structual.bridge.graphics.Shape;

import java.awt.*;
import java.awt.image.BufferedImage;

public class Rectangle extends Shape {

    private Graphics graphics;
    private BufferedImage rect;{

    }
    @Override
    public BufferedImage drawShape() {
        rect = new BufferedImage(200,200,BufferedImage.TYPE_INT_RGB);
        graphics = rect.getGraphics();
        Color color = super.myColor.getColor();
        graphics.setColor(color);
        graphics.fillRect(25,50,150,100);
        return rect;
    }
}
